<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<link href="${pageContext.request.contextPath}/common/page.css" rel="stylesheet" type="text/css">

<section class="page">
<form action="${pageContext.request.contextPath}/product/search" method="get" name="pageForm">
	<span>第 <em>${PAGEBEAN.current}</em> / ${PAGEBEAN.pageNum}页</span>
	<a href="${pageContext.request.contextPath}/product/search?page=${PAGEBEAN.previous}&pageSize=${PAGEBEAN.pageSize}">上一页</a>
	<a href="${pageContext.request.contextPath}/product/search?page=${PAGEBEAN.next}&pageSize=${PAGEBEAN.pageSize}">下一页</a>
	<label for="page">页数：</label>
	<select name="page" id="page">
		<!-- 此处要进行迭代出来 -->
		<c:forEach var="v" begin="${PAGEBEAN.first}" end="${PAGEBEAN.last}">
			<option value="${v}" ${PAGEBEAN.current eq v ? "selected='selected'" : ""}>${v}</option>
		</c:forEach>
	</select>
	<label for="pageSize">每页显示:</label>
	<input type="number" id="pageSize" name="pageSize" value="${PAGEBEAN.pageSize}"> 行
	<input type="submit" id="setPageSizeBtn" value="Go">
</form>
</section>

<script type="text/javascript" src="${pageContext.request.contextPath}/common/page.js"></script>
